//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __PowerManager_H__
#define __PowerManager_H__

class PowerManager: public Driver {
public:
    CARAPI Read(
        /* [in] */ UINT64 u64Offset,
       /* [in] */ UINT uNumberOfBytesToRead,
        /* [out] */ EzByteBuf ebbData,
        /* [out] */ IEvent * * ppCompletionEvent);

    CARAPI Write(
        /* [in] */ UINT64 u64Offset,
        /* [in] */ EzByteBuf ebbData,
        /* [out] */ UINT * puNumberOfBytesWritten,
        /* [out] */ IEvent * * ppCompletionEvent);

    CARAPI Control(
        /* [in] */ INT nControlCode,
        /* [in] */ EzByteBuf ebbInData,
        /* [out] */ EzByteBuf ebbOutData,
        /* [out] */ IEvent * * ppCompletionEvent);

    virtual void Dispose() {}
};

EXTERN void ShowDeviceStatus();
void PoSetCpuPowerOn(BOOL PowerOn);
void PoSetCameraPowerOn(BOOL PowerOn);
void  PoSetLcdPowerOn(BOOL PowerOn);
unsigned long PoGetLcdPowerPolicy();
unsigned long PoGetLcdPowerMode();
void EnterSleepModeCallback(int eType, int nCode, void *pParam);
void WakeFromSleepModeCallback(int eType, int nCode, void * pParam);
void EnterIdleModeNotify(int eType, int nCode, void *pParam);
void LockScreenNotify(int eType, int nCode, void *pParam);
void PoSetLcdPoweroffInterval(int interval);
unsigned long PoGetBootStatus();
void PoSetLcdChangeModePorc(TimerCallBackProc proc);
TimerCallBackProc PoGetLcdChangeModePorc();
void setWatchDog(int mSec);
#endif//
